Optical Tunability and Characterization of Mg–Al, Mg–Ti, and Mg–Ni Alloy Hydrides for Dynamic Color Switching Devices

Mg shows great potential as a metal hydride for switchable optical response and hydrogen detection due to its ability to stably incorporate significant amounts of hydrogen into its lattice. However, this thermodynamic stability makes hydrogen removal difficult. By alloying Mg with secondary elements, the hydrogenation kinetics can be increased. Here, we report the dynamic optical, loading, and stress properties of three Mg alloy systems (Mg–Al, Mg–Ti, and Mg–Ni) and present several novel phenomena and three distinct device designs that can be achieved with them. We find that these materials all have large deviations in refractive index when exposed to H2 gas, with a wide range of potential properties in the hydride state. The magnitude and sign of the optical property change for each of the alloys are similar, but the differences have dramatic effects on device design. We show that Mg–Ti alloys perform well as both switchable windows and broadband switchable light absorbers, where Mg0.87Ti0.13 and Mg0.85Ti0.15 can achieve a 40% transmission change as a switchable window and a 55% absorption change as a switchable solar absorber. We also show how different alloys can be used for dynamically tunable color filters, where both the reflected and transmitted colors depend on the hydrogenation state. We demonstrate how small changes in the alloy composition (e.g., with Mg–Ni) can lead to dramatically different color responses upon hydrogenation (red-shifting vs blue-shifting of the resonance). Our results establish the potential for these Mg alloys in a variety of applications relating to hydrogen storage, detection, and optical devices, which are necessary for a future hydrogen economy.


INTRODUCTION
The chemical process of hydrogenation has been implemented as a mechanism to dynamically modify the optical properties of metallic thin films and nanostructures, ranging from pure elements to metallic compounds. 1−8 Mg absorbs a large amount of hydrogen upon H 2 exposure and goes through dramatic changes in its optical properties. One challenge of using pure Mg in dynamic metal hydride devices is that the hydride state is too thermodynamically stable and must be unloaded at a high temperature. 9 The kinetics of both the absorption and the desorption are also slow, especially in bulk Mg, due to MgH 2 being a poor proton conductor, which limits the diffusion of H through the material. 10 In order to improve upon the kinetic and thermodynamic properties of Mg, alloying has been extensively used to destabilize the hydride phase and increase hydrogen diffusion. Alloying has been attempted with many metals including Co, 11−14 Fe, 11,14−16 and Mn, 14,17 among others, but the most common secondary alloying elements used in the literature are Al, [18][19][20][21][22]7,[23][24][25][26][27] and Ni. 28−38 These alloys have increased kinetics when compared to pure Mg 21,39−41 and were each found to have interesting optical responses upon hydrogenation.
The Mg−Ni system in particular has been of interest in the optical community due to Mg 2 Ni forming an intermediate optical "black state" during its loading process. 33−35 This black state is characterized by an intermediate loading state where the sample absorbs >75% of incident visible light when illuminated through a transparent substrate. The process has been investigated with 15 N nuclear reaction analysis hydrogen depth profiling 35 to determine the H atom vertical distribution in the sample. It was found that the black state formation is caused by preferential loading from the Mg 2 Ni/substrate interface, as opposed to the hydride being seeded near the dissociation sites at the Mg 2 Ni/Pd interface. A multi-layer interference effect occurs, where the bottom layer is fully hydrogenated Mg 2 NiH x and the top layer remains metallic Mg 2 Ni. This layered orientation creates the observed black state. In the fully hydrogenated state, some Mg−Ni alloys have also been found to have good switchable window properties, switching from a reflecting state to a transparent state. 32 The Mg−Ti system has been investigated for switchable solar absorbers, 25 switchable mirrors, 42 and hydrogen sensor applications. 43 These materials have the advantage of having a highly absorbing state for wavelengths across the visible region for thick films (>200 nm) in their fully hydrogenated state, as opposed to Mg 2 Ni which obtains this highly absorbing state only during intermediate loading. 26 This high-absorbing state occurs in Mg y Ti 1−y for y = 0.7−0.8. This alloying system is also of interest due to a decrease in degradation over many hydrogenation cycles, along with faster kinetics during these cycles, when compared to pure Mg. 26 For very thin Mg−Ti films (<40 nm), the hydride state is more color-neutral than Mg−Ni alloys (which have a yellow tint), allowing for more aesthetically pleasing switchable windows, albeit with fairly low transmission amounts ∼20%. 42 Mg−Al alloys are of interest for their high hydrogen weight percent (weight of hydrogen in a material divided by the total weight of the material) for hydrogen storage along with much faster hydrogenation kinetics at room temperature when compared to Mg. 22 These materials also have been suggested as switchable window devices as Mg−Al alloys with ∼70% Mg have been demonstrated to have color-neutral transmission. 21 To date, all optical measurements reported in the literature of these alloys consist of using normal incidence reflection and transmission measurements to determine their properties, such as the absorption coefficient and/or the optical band gap (e.g., in Mg−Ti 26 and Mg−Ni alloys 31,44 ) and the dielectric function by of the reflection and transmission data with a Drude− Lorentz model (e.g., in Mg−Ni alloys 35,45 ). These methods of obtaining thin-film optical properties are much less sensitive than variable-angle spectroscopic ellipsometry, especially for very thin films <50 nm. 46 There have been no reports in the literature of the optical properties of Mg−Al alloys, or of any Mg−Ti, Mg−Ni, or Mg−Al alloys in intermediate loading states. Our system allows for in situ ellipsometry to dynamically investigate the optical properties of thin films (<50 nm) of these materials with high sensitivity as they are hydrogenated. 1,2,47 By using similar deposition parameters to fabricate the different alloy systems, these measurements also allow us to quantitatively compare the responses of these different systems.
In this work, we measure in situ the dynamic optical properties of different atomic ratios of thin-film Mg−Al, Mg− Ti, and Mg−Ni alloys as they are exposed to H 2 gas. We also quantify the loading and stress values of these alloys during their exposure to H 2 . We find large optical changes for all the alloys investigated, with Mg 0.85 Ti 0.15 exhibiting the largest optical changes for any alloy. We confirm the optical black state in the Mg−Ni samples through transfer-matrix method (TMM) simulations using our measured optical properties and observe the highest absorbing state for Mg 0.73 Ni 0.27 , as expected with that atomic composition being the closest to Mg 2 Ni. We demonstrate three potential dynamic devices: switchable windows, switchable light absorbers, and tunable color filters. The Mg−Ti alloys exhibit the best properties for each application, with Mg−Ni alloys showing the widest range of different property changes depending on the alloy composition. Overall, our in situ experiments, quantitative analysis, and computational designs lay the foundation for scalable and robust devices. Our material selection and their intrinsic optical behavior are well-suited for photonic devices where reversible color changes are required.

EXPERIMENTAL SECTION
Each thin-film sample is fabricated by room-temperature physical vapor deposition cosputtering. Two separate AT-cut 5 MHz quartz crystal microbalances (QCMs), a glass slide, and a Si chip are included in the deposition chamber for each deposition. Prior to deposition, samples are cleaned with acetone, methanol, isopropanol, and water. The alloys are deposited through a 12.5 mm diameter shadow mask centered on the QCM substrate. The direct current powers of the sputtering tool ranged from 50 to 450 W to attain the different alloy compositions. These minimum and maximum values are determined by the minimum voltage necessary to maintain a plasma and the voltage limit of the tool, respectively. Each sample was capped with a 3 nm Pd layer without breaking vacuum to catalyze the hydrogenation reaction and prevent surface oxidation of the sample. The composition of each alloy is determined with EDX taken on the Si chip included in the deposition chamber, taking an average of five measurements at different points on the sample to ensure uniform alloying.
The optical properties of the materials are determined with in situ spectroscopic ellipsometry using the system described in Palm et al. 1 To determine the thickness of the Mg alloy films, the glass slide sample that is included in the deposition chamber is measured with ellipsometry and transmission measurements. The raw Ψ and Δ data are then fit with an optical model with the properties of the Mg alloy and the thickness of that alloy as fit parameters. The optical properties of the glass substrate are taken before the metal deposition and are defined in the model. The properties of the sputtered Pd are measured separately and are defined in the model. The thickness of the Pd layer is set to be 3 nm in the model for all alloy samples. With the transmission measurements, this fitting procedure allows for unambiguous determination of the thickness of the Mg alloy films. The thicknesses of the films we investigated ranged from 19 to 42 nm. As a consistency check for our thickness measurements, we use the same model properties and thicknesses on the data taken on the Au QCM electrode substrate and find good agreement without refitting the model parameters.
The volume expansion of these Mg-based alloys is an important factor in the thin-film optical model fittings. The Mg alloy thin films investigated here have appreciable transmission, and the optical effect of the substrate must be taken into account. For these alloys, the volume expansion for each is found to be ∼15% over the atomic ratio region that we are investigating, 35,48 and we use this value for all of our samples. To include this expansion in the model, we use the dynamic loading data to determine how much H is in the film at each optical time step and then scale the total thickness expansion by the same ratio as the current loading to the final loading value (i.e., if a film's final calculated loading value is 1 and at time step t, we calculate that the loading is H/M = 0.33, then we define the volume expansion at this time step to be 0.33 × 15% = 5%). H/M is defined to be the number of hydrogen atoms per metal atom in the metal alloy lattice, with the total number of metal atoms equaling the number of Mg atoms added to the number of atoms from the secondary alloying element. We also define the loading amount of the Pd capping layer by this same ratio. At each time step, with the thicknesses and Pd cap properties defined, we then use a B-spline model with 0.3 eV node spacing to fit the optical properties of the Mg-alloy.
The hydrogen loading for each alloy is measured on the second QCM sample with the method outlined in a study by Murray et al. 47 To convert from the QCM frequency to the H/M loading ratio, the density of each sample must be input into the calculation. For Mg−Ti, both Mg and Ti have hexagonal close-packed lattice structures, and no known intermetallic states form. Because of this behavior, we believe that a linear weighting of the densities of Mg and Ti in the same ratio as their atomic percent in the alloy is a reasonable approximation of the density. As a check of this assumption, we compare densities calculated from linear weighting with densities calculated from lattice constant measurements using X-ray diffraction measurements 23 and find good agreement (<6% difference). For the Mg−Al system, we also choose to use this linear weighting scheme because there are no other alloy phases found for this material when the atomic Mg percent >60%. 21 For the Mg−Ni system, we use a slightly different method. Mg 2 Ni is a known intermetallic with a density of 3.48 g/cm 3 and because this forms a separate phase within the Mg−Ni alloys, a linear combination of pure metal densities is not applicable. From ref 44, we know for Mg y Ni 1−y if 0.67 < y < 0.89, the alloy forms a varying mixture of crystalline Mg 2 Ni and amorphous Mg 0.89 Ni 0.11 , but the lattice constant remains constant in this region. If 0.89 < y < 0.95, the lattice constant begins to expand, and the alloy is mainly nanocrystalline Mg 2 Ni and crystalline Mg. Using this knowledge of the phases, we use the following equation to calculate the densities of the Mg−Ni alloys for 0.67 < y < 0.89 where ρ Mg is the density of pure Mg. Here, we linearly weight the density of Mg 0.89 Ni 0.11 (calculated with eq 1) with the density of Mg. This rationale uses the fact that for samples with up to 89% Mg, there is no expansion in the lattice, and with additional Mg added above the 89% point, we are adding crystalline Mg with the density ρ Mg . Using these calculated densities and the thicknesses found from the optical fittings, we can then calculate the loadings and stresses with the method outlined in a study by Murray et al. 47

Optical Properties of Mg Alloy Hydrides.
In the following sections, we report and discuss the dynamic optical properties of our fabricated Mg−Al, Mg−Ti, and Mg−Ni alloys as they are exposed to 1 atm H 2 gas.
3.1.1. Mg−Al Hydrides. Figure 1 shows the measured optical properties ñ= n + ik of four different compositions of Mg−Al alloys and how these properties change under complete hydrogenation under 1 bar H 2 pressure. For these materials, we observe a small spread in the initial and final properties of the materials, which is as expected due to all the alloys being close together in the atomic composition. The reason for this proximity in composition is a relative lack of sensitivity of the different materials to different deposition voltages (i.e., 200 W Mg and 200 W Al powers compared to 450 W Mg and 50 W Al powers only give a 7% difference in atomic Mg percent). We find that both the real and imaginary parts of the index of refraction increase with longer wavelengths for the alloy in the metallic state as we expect from most lossy metals. Interestingly, we find that metallic Mg 0.77 Al 0.23 exhibits the largest n and k across the spectrum, as well as the largest optical change in k. We find that for all the Mg−Al alloys, the change in the optical properties upon hydrogenation follow the same trend. For Δn, there is little variation from sample to sample. Each sample exhibits a positive Δn for shorter wavelengths and a negative change for longer wavelengths, with the crossover point from positive to negative Δn occurring between 1100 and 1225 nm. All samples exhibit a decrease in k across the measured spectrum, with the largest decreases occurring in the NIR and the smallest decreases in the visible spectrum. Despite having the largest Δk, fully loaded Mg 0.77 Al 0.23 H x still has the largest k across the visible spectrum, although only by a small margin, and the second highest in the NIR. In the final hydride state, as shown in Figure 1c, we find that each of the materials still has significant attenuation in the long-wavelength visible and into the NIR spectrum, with k > 3 after ∼1000 nm for each alloy. This behavior is despite the fact that the NIR optical properties saw the largest decreases in k. For the real part of the index of refraction, we find a minimum in the mid-visible spectrum that increases to large values (>3) in the NIR. The hydride samples are still somewhat optically metallic, not exhibiting a complete transition to a dielectric material.
As shown in Figure 2, we observe the intermediate states during the hydrogen loading. These plots show a smooth transition of the optical properties from the metallic (lighter colored curves) to the hydride states (darker colored curves). Note that the chosen optical curves on this plot are not linearly spaced with time but are instead chosen to show the range of properties of the intermediate states. Loading generally begins slowly as small amounts of H 2 are introduced to the chamber, then increases quickly during the beginning of the α to β phase  Figure 3a shows the metallic optical properties of five different fabricated Mg−Ti alloys with the atomic Mg percent ranging from 82−91%. We find that the n values in the metallic state are fairly close together, with the exception of Mg 0.89 Ti 0.11 , which exhibits a lower n for the state. The higher Mg percent alloys exhibit higher k values, again except for Mg 0.89 Ti 0.11 (we will discuss the discrepancies of the Mg 0.89 Ti 0.11 sample further down). Higher attenuation for samples with more Mg is expected as Mg has much higher k   values than Ti in their unalloyed form. The metallic properties of these Mg−Ti samples also align fairly closely with the metallic Mg−Al alloys investigated in the previous section. As we hydrogenate these samples, we find similar types of changes in the optical properties when compared to the Mg−Al samples, with n increasing in the visible and decreasing the in the NIR spectrum, and with k decreasing for all wavelengths, with larger decreases for longer wavelengths. There is a much broader range in the changes in properties for these alloys, and two alloys, Mg 0.85 Ti 0.15 and Mg 0.87 Ti 0.13 , exhibit larger changes than the Mg−Al samples. Figure 3c Figure 5a shows the properties in the metallic state, where we see a much larger spread in initial n values for these materials, but n and k still follow the same trend as was found with the other Mg alloys (n and k generally increase with increasing wavelength). This larger spread in initial properties is expected as we are able to obtain a larger range of atomic ratios for this alloy system compared to the other two, ranging from 59−92% Mg. In Figure 5b, we see the same trends of optical property change as Mg−Al and Mg−Ti with large decreases in k across the spectrum upon hydrogenation and increases in n in the visible spectrum with decreases in the NIR spectrum. In the hydride state in Figure 5c, we see a large range of potential final optical properties depending upon the alloy ratio. Generally, the lower Mg percent hydrides have a higher n across the spectrum, with the Mg 0.90 Ni 0.10 sample demonstrating the lowest n across most of the spectrum and Mg 0.59 Ni 0.41 the highest. Most of the hydrides have low attenuation in the visible spectrum, with k < 2. The higher Mg percent hydrides then have larger attenuation into the NIR  spectrum, while the lower Mg percent samples exhibit a more constant k across the measured spectrum. Figure 6 shows the dynamic transition-state data for the Mg−Ni samples. For each of the samples, the transitions are mostly monotonic without any exotic features. For the intermediate loading states, here we are modeling the Mg− Ni film as homogeneous throughout the thickness of the film. As was discussed in the Introduction section, it has been found that Mg−Ni films do not load homogeneously but instead with preferential phase formation from the substrate of the film that propagates to the Pd cap. Our modeling process is not contradictory to this process and still allows for the bulk characterization of the properties of the film in this orientation with illumination through the Pd cap. The low mean squared error (MSE) obtained in our optical fits indicates that our model accurately captures the optical properties of our samples. For our dynamic fits, the MSE for any individual fit was never greater than 10, indicating a good fit. However, for a different illumination orientation of the device (i.e., backside illumination through a transparent substrate), our intermediate model fits would not account for the layering effects of the loading. To model those bulk responses with our setup, the optical properties would have to be measured in that same orientation. Note that this layering effect would only affect the properties in the intermediate states and have no effect on the modeling of the metallic or fully hydrogenated states, as shown in Figure 5.
To determine whether any of our materials would exhibit this black state with backside illumination, we modeled the multi-layer loading process with TMM simulations. Figure 7a shows the simulation architecture. The samples consist of illumination through a SiO 2 substrate. The layers proceed from the substrate with the fully hydrogenated Mg−Ni hydride, the fully metallic Mg−Ni alloy, and lastly a 3 nm PdH x capping layer. The hydrogenation of the material is simulated by beginning with the Mg−Ni−H layer equal to 0 nm and then increasing this layer size while decreasing the Mg−Ni layer by the same amount, until the sample is completely hydrogenated. We defined the alloy thickness to be 25 nm for these simulations. Using this method, we find a high-absorbing intermediate state for multiple samples, with the largest absorption occurring for the Mg 0.73 Ni 0.27 sample, which is expected as this material is the closest composition to Mg 2 Ni for which the black state was initially discovered. In Figure 7b, we show the absorption curves for different loading thicknesses for this alloy, where the peak absorption occurs at a hydride thickness of 12 nm, which is equal to half of the thin film being loaded.

Stress and Loading Properties.
With the second QCM crystal included in the deposition chamber, we dynamically measure the loading and stress properties of the films. The loading values for all the samples are shown in Figure 8.   atomic percentages to determine if there is a correlation of higher loading for higher Al percent for any range of compositions and if the optical property change is greater in this region.
The loading values of the Mg−Ti films are shown in Figure  8b. Three of these values are in general agreement in the literature, which finds that the average amount of loading of Mg−Ti alloys in this atomic composition range is H/M = 1.55. 26,41 We find two samples that fall measurably below this average, with Mg 0.82 Ti 0.18 at 0.96 and Mg 0.89 Ti 0.11 at 0.79. We also find that the Mg 0.89 Ti 0.11 sample had the lowest optical change of any of the investigated alloys. We suspect that there was an issue with the fabrication of this sample that prevented a complete loading. This could have been caused by an incomplete Pd capping layer that did not fully encapsulate the sample, allowing for oxidation of the surface of the alloy, or potential alloying between the Pd capping layer and Mg near the surface of the Mg−Ti alloy.
For Mg−Ni alloys in Figure 8c, we see generally lower calculated loadings than that for the other two alloys. We also find a slightly negative correlation between the loading amount and the atomic Mg percent. This does not agree with previously found data in the literature, which found that there should be a slightly positive correlation between these values and that they should fall between 1.2 and 1.4 H/M. 31 This loading difference could be attributed to differences in sample preparation. Other thin-film Mg−Ni alloys have been fabricated with multi-layer metal deposition followed by a high-temperature anneal, as opposed to our cosputtering method. These different fabrication conditions could poten-  tially be forming different alloying phases within the metal, which would affect the total loading amount. Further studies on the crystal structures of Mg−Ni alloys fabricated with these two techniques should be carried out to determine if there is any difference.
In Figure 9, we show the total stress change of each of the measured Mg alloys upon full hydrogenation. These stress changes are compressive and are defined to be positive. We find the stresses for the samples to be consistent within a material system. Taking the averages of the stresses in each system, the Mg−Al samples have the highest stresses with an average of 0.56 GPa, next is Mg−Ti with an average of 0.48 GPa, and finally the Mg−Ni alloys have the lowest measured stress with an average of 0.36 GPa.

Applications.
In this section, we use our measured optical properties of the alloys to demonstrate three potential applications. We use the TMM to simulate thin-film responses of these materials for different thicknesses and on distinct substrates. The first application of these materials is for switchable window technologies. As an example, we simulate the transmission through the alloys in their metallic and hydride states and compare the transmission amounts. We use a metallic alloy thickness of 25 nm with a 3 nm Pd capping layer. We find that these thicknesses are in the ideal range for switchable window purposes because it is just thick enough in the metallic state to create high reflection, while remaining thin enough to allow appreciable transmission in the hydride state. These simulations also consider the 15% volume expansion of the alloys upon hydrogenation. Another important factor in window technologies is to have color-neutral transmission. Windows with non-neutral color transmission tint the light as it transmits through the window, which is not ideal when attempting to make a clear window. To model this color distortion, we use the CIE 1931 XYZ color space and plot the perceived colors of the transmitted spectrum. Note that only x and y need to be plotted to fully characterize the color because x + y + z = 1. On these plots, color-neutral is the x = y = 0.333 data point, which creates the ideal window. We show these switchable window properties for all the investigated alloys in Figure 10.
For the Mg−Al alloys, we see poor transmission in the hydride state, with the Mg 0.84 Al 0.16 alloy having the highest transmission through the visible spectrum with values <40% transmission for most of the spectrum. These materials generally only exhibit ∼20% absolute change in transmission upon hydrogenation, agreeing with results previously reported in the literature for Mg x Al 1−x with x > 0.69. 21 This behavior is due to the materials still exhibiting a high attenuation in the visible, even in the hydride state. These windows are close to color neutral, even with their low transmission, adding a small blue−green tint to the transmitted light.
Some of the Mg−Ti alloys perform much better as switchable window technologies with transmissions values >60% across most of the visible spectrum for Mg 0.85 Ti 0.15 and Mg 0.87 Ti 0.13 . For these samples, we observe a transmission change of ∼40%. Higher transmission can be achieved in the hydride state by a thinning of the sample; however, this thinning causes the transmission in the metallic state to also become significantly higher. We find the transmission colors of these windows to be similar to those of the Mg−Al samples, being mostly color neutral with a slight blue−green tint. Mg 0.85 Ti 0.15 is the most color neutral, in addition to having the highest transmission across most of the visible spectrum.
The Mg−Ni alloys measured in this manuscript have poor switchable window characteristics, with low transmissions in the hydride state in the shorter wavelength visible region, with similar results for a Mg-rich Mg−Ni films having been found previously where a peak transmission of 25% was found for an 80 nm thin film. 32 For the longer wavelength visible, we see increased transmission but still only achieve values of ∼50%. However, we do see ∼40% transmission changes in this region. Some Mg−Ni samples exhibit very good color neutrality, with Mg 0.92 Ni 0.08 having a transmission color value of x = 0.325 and y = 0.338. The other alloys have a slight yellow tint, as opposed to the blue−green tint of the Mg−Al and Mg−Ti alloys.
As mentioned in the Introduction, Mg−Ti alloys have also been investigated as broadband switchable light absorbers, with a highly reflecting state in the metallic form and a highly absorbing state when hydrogenated. The high absorption states for these materials have been found with thicker samples >200 nm, much thicker than measured here, and it has been demonstrated that the total absorption of the film can be significantly tuned by varying the thickness of the film. 26,49 To see if our measured properties show any potential for switchable absorption, we modeled a 300 nm Mg−Ti film on an SiO 2 substrate with a 10 nm Pd capping layer. The results of these simulations are shown in Figure 11. We see that for three of our measured Mg−Ti alloys, we achieve large amounts of switchable absorption throughout the visible spectrum, with absorption tailing off into the NIR spectrum. In the visible wavelength region, Mg 0.87 Ti 0.13 , Mg 0.85 Ti 0.15 , and Mg 0.82 Ti 0.18 all achieve >80% absorption in the hydride state with <25% absorption in the metallic state (corresponding to high reflection in this state). This is a very large absorption change upon hydrogenation for these alloy compositions and shows their potential for broadband switchable light absorbers. These results agree with the previously reported literature showing that Mg x Ti 1−x alloys with x ≈ 0.2 is an excellent chemical composition for solar absorption. 25 Finally, we investigate the potential of utilizing these metal alloys as tunable color filters. Our proposed structure uses a cavity structure, consisting of a 20 nm Au backplane on SiO 2 , a variable length SiO 2 cavity, capped with 25 nm of Mg alloy with a 3 nm Pd cap. We find that the Mg−Ti alloys have the most vibrant color change, with Mg 87 Ti 17 exhibiting a change from a pale orange to a vibrant blue with an SiO 2 cavity length of 260 nm. The Mg−Ni alloys showed an interesting effect upon hydrogenation, with some alloys exhibiting a blue-shift in color change upon hydrogenation, while other exhibit a redshift (Figure 12g−l). Combining these different alloys into a single structure could allow for an even greater relative color change in a device. The Mg−Al shows the smallest color change of the alloys investigated in either the reflection or transmission spectrum.

CONCLUSIONS
In conclusion, we have for the first time experimentally measured the complex optical properties of different compositions of Mg−Al, Mg−Ti, and Mg−Ni alloys during the hydrogenation process using variable-angle spectroscopic ellipsometry. By quantifying changes in the refractive index of these alloys, we accurately designed three classes of devices: switchable windows, solar absorbers, and color filters. Our results show the chemical composition dependence on the optical properties of each of these devices, agreeing with the literature on overlapping compositional data points for the switchable windows and solar absorbers, with no literature suggesting tunable color filters with these materials to the authors' knowledge. Surprisingly, we found a wide range in optical properties for the alloys in the final hydrogenated state, albeit most of the samples showing similar properties in the metallic state. We dynamically measured the loadings and stresses of all samples and found that the loadings of our materials are less than those previously reported in the literature, suggesting that these material properties are likely sensitive to fabrication differences. Future work will focus on elucidating the effects of different fabrication techniques (evaporation vs sputtering, annealing affects, substrate preparation, etc.) on the different material properties of these alloys. We also explored the implementation of these materials into optical devices, showing that Mg 0.87 Ti 0.13 and Mg 0.85 Ti 0.15 can achieve 40% transmission changes as switchable windows and 55% absorption changes as switchable solar absorbers. The alloys could also be used as active layers in tunable color filters. The switching process of the dualreflective-transmissive filter introduced here is scalable and reveals a previously overlooked class of materials, Mg-basedalloys, as a model system for color pixels to be applied in situations where reconfigurability is desired, for example, encryption, tunable windows, or holography.